    package com.zpark.service.Impl;

    import com.github.pagehelper.PageHelper;
    import com.zpark.mapper.IRankingMapper;
    import com.zpark.pojo.Ranking;
    import com.zpark.service.IRankingService;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Service;

    import java.util.List;

    @Service
    public class RankingServiceImp implements IRankingService {
        @Autowired
        private IRankingMapper rankingMapper;

        @Override
        public List<Ranking> findALl(Integer page, Integer size) {
            //设置分页参数，pageNum：页码，pageSIze：每页大小
            PageHelper.startPage(page,size);

            //执行查询数据操作
            List<Ranking> lists = rankingMapper.selectAll();
            return lists;
        }
    }
